import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import requireToUrlPlugin from './src/utils/requireToUrlPlugin';

// https://vitejs.dev/config/
export default defineConfig({
  base: './',
  plugins: [
    vue(),
    requireToUrlPlugin()
  ],
  //设置全局配置
  // define: {
  //   'process.env': {
  //     'BASE_API':'https://overview-dev.derunht.cn/'
  //   }
  // },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  }
})